package com.fintech.third.utils;

import java.util.Map;
import java.util.concurrent.Callable;

import org.apache.log4j.Logger;

import com.fintech.common.util.ApiResponse;
import com.fintech.third.constant.ThirdMethodConstants;
import com.fintech.third.model.bairong.BankcardCheckThree;
import com.fintech.third.service.bairong.BaiRongService;
import com.marvels.common.utils.MarvelsLogUtil;

import net.sf.json.JSONObject;


public class BaiRongThreadThree implements Callable<ApiResponse>{
	private Map<String, String> dataMap;
	private BaiRongService BaiRong=(BaiRongService)ApplicationContextGet.getApplicationContext().getBean("freshBaiRong");
	public Map<String, String> getDataMap() {
		return dataMap;
	}

	public void setDataMap(Map<String, String> dataMap) {
		this.dataMap = dataMap;
	}

	@Override
	public ApiResponse call() throws Exception {
		JSONObject json = new JSONObject();
		String loanId=dataMap.get("loanId");
		json.put("id", dataMap.get("idNo"));
		json.put("name", dataMap.get("name"));
		json.put("bank_id", dataMap.get("bankCardNo"));
		ApiResponse<BankcardCheckThree> apiResponse = null;
		try {
			apiResponse = BaiRong.bankcardCheckThreeReport(json,SerialNumCreater.creater("BR", loanId),loanId,ThirdMethodConstants.channel);
		} catch (Exception e) {
			e.printStackTrace();
		}
		MarvelsLogUtil.getInstance().info("=====================>>>>>>>百融银行卡三要素子线程" + Thread.currentThread() + "执行完毕");
		return apiResponse;
	}
}	
